package com.seio.edc.common;

public class Key2Zero {

	/**
	 * 云平台数据大于一定天数后无法取得时和参与计算时,包含key字段的清零.
	 * @param activeState
	 * @return
	 */
	public static String key2Zero(String activeState){
		String rStr="";
		for(int i=0;i<activeState.length();i+=20){
			String b = "";
			if(activeState.length() < (i+20)){
				b=activeState.substring(i,activeState.length());
			}else{
				b=activeState.substring(i,i+20);
			}
			if(b.contains("aaa")){ //云平台数据取得失败后插入的数据以aaa开头,bbb结尾的那段字符.
				rStr += "00000000000000000000";
			}else{
				rStr += b;
			}
		}
		
		return rStr;
	}
	
}
